package com.damai.job;

import org.citywithincity.jobqueue.JobException;

import com.damai.lifecycle.JobIoException;
import com.damai.lifecycle.JobNotFoundException;

/**
 * 异步提交任务
 * @author renxueliang
 *
 */
public abstract class AsyncSubmitJob<T,R> {
	
	/**
	 * 异步提交
	 * @param data
	 * @throws JobIoException
	 * @throws JobException
	 */
	public abstract void submit(T data) throws JobIoException, JobException;
	
	
	
	/**
	 * 确认
	 * @param status
	 * @param data
	 * @throws PosError
	 * @throws PosIOError
	 */
	public abstract R confirm(T data) throws JobIoException,JobNotFoundException;
	
}
